<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: lboxctl1.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00179_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">lboxctl1.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00179.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a03620.html">precomp.h</a>&quot;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#pragma hdrstop</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a77089c8a1f9db78b7517e7bb05c51216">xxxLBBinarySearchString</a>(<a class="code" href="a01921.html">PLBIV</a> plb,LPWSTR lpstr);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="a00257.html#ab88cd7027b6acd69d6c39d4eac56cc53">   26</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00179.html#ab88cd7027b6acd69d6c39d4eac56cc53">xxxSetLBScrollParms</a>(<a class="code" href="a01921.html">PLBIV</a> plb, <span class="keywordtype">int</span> nCtl)</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">int</span>         iPos;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordtype">int</span>         cItems;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>        iPage;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    SCROLLINFO  si;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    BOOL        fNoScroll = FALSE;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <a class="code" href="a01917.html">PSCROLLPOS</a>  psp;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    BOOL        fCacheInitialized;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">int</span>         iReturn;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordflow">if</span> (nCtl == SB_VERT) {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        iPos = plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        cItems = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        iPage = plb-&gt;<a class="code" href="a01921.html#af031416b0c1aad3b57cc15c469f41ecc">cItemFullMax</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a0a54068a7898d057f9779868af834827">fVertBar</a>)</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            fNoScroll = TRUE;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        psp = &amp;plb-&gt;<a class="code" href="a01921.html#a564b3833691426f4291fbbae1c9f9dc6">VPos</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        fCacheInitialized = plb-&gt;<a class="code" href="a01921.html#aa9348d44e90566be977ce510adab2424">fVertInitialized</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a622fb355036d625d60042b78025ecdc3">fMultiColumn</a>) {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            iPos   = plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a> / plb-&gt;<a class="code" href="a01921.html#ad26857fa34502b7c3be7f4ea963adcc2">itemsPerColumn</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            cItems = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> ? ((plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1) / plb-&gt;<a class="code" href="a01921.html#ad26857fa34502b7c3be7f4ea963adcc2">itemsPerColumn</a>) + 1 : 0;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            iPage = plb-&gt;<a class="code" href="a01921.html#a8abffa689a2601dffeb2ec73f0d35c8b">numberOfColumns</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            iPos = plb-&gt;<a class="code" href="a01921.html#aaef455959b7907cbaff286e61c5e029b">xOrigin</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            cItems = plb-&gt;<a class="code" href="a01921.html#ac78ad025d5ad2100193d42ab9c1a963e">maxWidth</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            iPage = plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>-&gt;<a class="code" href="a02581.html#a17d59d04094aef8b577c0aa781cdf2c6">rcClient</a>.right - plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>-&gt;<a class="code" href="a02581.html#a17d59d04094aef8b577c0aa781cdf2c6">rcClient</a>.left;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a3b09e3cddaf31f472117320e7a71ce17">fHorzBar</a>)</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            fNoScroll = TRUE;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        psp = &amp;plb-&gt;<a class="code" href="a01921.html#a594afd187a730d79a889985d8f3c8d73">HPos</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        fCacheInitialized = plb-&gt;<a class="code" href="a01921.html#a50322b89309802e9bdbefe0884dea9ca">fHorzInitialized</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">if</span> (cItems)</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        cItems--;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">if</span> (fNoScroll) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="comment">// Limit page to 0, posMax + 1</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        iPage = max(min((<span class="keywordtype">int</span>)iPage, cItems + 1), 0);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="comment">// Limit pos to 0, posMax - (page - 1).</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordflow">return</span>(max(min(iPos, cItems - ((iPage) ? (<span class="keywordtype">int</span>)(iPage - 1) : 0)), 0));</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        si.fMask    = SIF_ALL;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a8c22d5acea85648f5ad4d7388a73cd3e">fDisableNoScroll</a>)</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            si.fMask |= SIF_DISABLENOSCROLL;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">         * If the scrollbar is already where we want it, do nothing.</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">if</span> (fCacheInitialized) {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordflow">if</span> (psp-&gt;<a class="code" href="a01917.html#a945bb59aa2eb5c750311ce55eb87699a">fMask</a> == si.fMask &amp;&amp;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                    psp-&gt;<a class="code" href="a01917.html#acc0a73612ab9f5683ec1f2af53dcdca0">cItems</a> == cItems &amp;&amp; psp-&gt;<a class="code" href="a01917.html#ad4c37af4c2923b1bf9383de2d90d3bbf">iPage</a> == iPage &amp;&amp;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                    psp-&gt;<a class="code" href="a01917.html#a82743a203ae935594531fdbc9539b545">iPos</a> == iPos)</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                <span class="keywordflow">return</span> psp-&gt;<a class="code" href="a01917.html#ab82d6fc6becaa18c4a882bcc35cc1a6a">iReturn</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (nCtl == SB_VERT) {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            plb-&gt;<a class="code" href="a01921.html#aa9348d44e90566be977ce510adab2424">fVertInitialized</a> = TRUE;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a50322b89309802e9bdbefe0884dea9ca">fHorzInitialized</a> = TRUE;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        si.cbSize   = <span class="keyword">sizeof</span>(SCROLLINFO);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        si.nMin     = 0;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        si.nMax     = cItems;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        si.nPage    = iPage;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        si.nPos     = iPos;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        iReturn = <a class="code" href="a00362.html#a790ab491160804ab82699e9f0edb5077">NtUserSetScrollInfo</a>(HWq(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>), nCtl, &amp;si, plb-&gt;<a class="code" href="a01921.html#abae0c031d21e87807959f436a83ce8a4">fRedraw</a>);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment">         * Update the position cache</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        psp-&gt;<a class="code" href="a01917.html#a945bb59aa2eb5c750311ce55eb87699a">fMask</a> = si.fMask;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        psp-&gt;<a class="code" href="a01917.html#acc0a73612ab9f5683ec1f2af53dcdca0">cItems</a> = cItems;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        psp-&gt;<a class="code" href="a01917.html#ad4c37af4c2923b1bf9383de2d90d3bbf">iPage</a> = iPage;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        psp-&gt;<a class="code" href="a01917.html#a82743a203ae935594531fdbc9539b545">iPos</a> = iPos;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        psp-&gt;<a class="code" href="a01917.html#ab82d6fc6becaa18c4a882bcc35cc1a6a">iReturn</a> = iReturn;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordflow">return</span> iReturn;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;}</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="a00257.html#a824dce001bf204fd93713c3f61f26890">  117</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a>(</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb)</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;{</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    BOOL fVertDone = FALSE;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    BOOL fHorzDone = FALSE;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="comment">// Don&#39;t do anything if there are no scrollbars or if parents</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="comment">// are invisible.</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordflow">if</span> ((!plb-&gt;<a class="code" href="a01921.html#a3b09e3cddaf31f472117320e7a71ce17">fHorzBar</a> &amp;&amp; !plb-&gt;<a class="code" href="a01921.html#a0a54068a7898d057f9779868af834827">fVertBar</a>) || !plb-&gt;<a class="code" href="a01921.html#abae0c031d21e87807959f436a83ce8a4">fRedraw</a>)</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="comment">// Adjust iTop if necessary but DO NOT REDRAW PERIOD.  We never did</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="comment">// in 3.1.  There&#39;s a potential bug:</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="comment">//      If someone doesn&#39;t have redraw off and inserts an item in the</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// same position as the caret, we&#39;ll tell them to draw before they may</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">// have called LB_SETITEMDATA for their item.  This is because we turn</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">// the caret off &amp; on inside of NewITop(), even if the item isn&#39;t</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="comment">// changing.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <span class="comment">//      So we just want to reflect the position/scroll changes.</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="comment">// CheckRedraw() will _really_ redraw the visual changes later if</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="comment">// redraw isn&#39;t off.</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a>) {</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <a class="code" href="a00182.html#ae865bdbf8fc8b8c3982b92b6ecec38bd">xxxNewITop</a>(plb, plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        fVertDone = TRUE;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    }</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a622fb355036d625d60042b78025ecdc3">fMultiColumn</a>) {</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a>) {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;            fHorzDone = TRUE;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            <a class="code" href="a00182.html#ab4fb2819fdd86c30f99e14e003eff202">xxxLBoxCtlHScroll</a>(plb, SB_THUMBPOSITION, plb-&gt;<a class="code" href="a01921.html#aaef455959b7907cbaff286e61c5e029b">xOrigin</a>);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <span class="keywordflow">if</span> (!fVertDone)</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;            <a class="code" href="a00179.html#ab88cd7027b6acd69d6c39d4eac56cc53">xxxSetLBScrollParms</a>(plb, SB_VERT);</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    }</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordflow">if</span> (!fHorzDone)</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <a class="code" href="a00179.html#ab88cd7027b6acd69d6c39d4eac56cc53">xxxSetLBScrollParms</a>(plb, SB_HORZ);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;}</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="a00257.html#a34e78a059332bba440d5d7a41b9ebb75">  168</a></span>&#160;LONG <a class="code" href="a00179.html#a6884cfb39f26b8e1f44ad90a3e96b3d1">LBGetItemData</a>(</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sItem)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;{</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    LONG buffer;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    LPBYTE lpItem;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">if</span> (sItem &lt; 0 || sItem &gt;= plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) {</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_INDEX, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="comment">// No-data listboxes always return 0L</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a>) {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="keywordflow">return</span> 0L;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    lpItem = (plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> +</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            (sItem * (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>) : <span class="keyword">sizeof</span>(<a class="code" href="a01929.html">LBODItem</a>))));</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    buffer = (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? ((<a class="code" href="a00257.html#a7834189a4c8f8e19088773b593228d40">lpLBItem</a>)lpItem)-&gt;itemData : ((<a class="code" href="a00257.html#a763f0a69a1a392a3db04ce31f8fbcbac">lpLBODItem</a>)lpItem)-&gt;itemData);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keywordflow">return</span> buffer;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;}</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="a00257.html#a3c14aa4895db5d5bf93a47a53765c9d1">  206</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a25a104b0d4db7572f113386362e33e05">LBGetText</a>(</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    BOOL fLengthOnly,</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    BOOL fAnsi,</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> index,</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    LPWSTR lpbuffer)</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;{</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    LPWSTR lpItemText;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cchText;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">if</span> (index &lt; 0 || index &gt;= plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_INDEX, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    }</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> &amp;&amp; plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a>) {</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;<span class="comment">         * Owner draw without strings so we must copy the app supplied DWORD</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="comment">         * value.</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        cchText = <span class="keyword">sizeof</span>(<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>);</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <span class="keywordflow">if</span> (!fLengthOnly) {</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            LONG UNALIGNED *p = (LONG UNALIGNED *)lpbuffer;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;            *p = <a class="code" href="a00179.html#a6884cfb39f26b8e1f44ad90a3e96b3d1">LBGetItemData</a>(plb, index);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        }</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        lpItemText = <a class="code" href="a00176.html#af8fe5eea4ff2e080e2f80ff86719a3c8">GetLpszItem</a>(plb, index);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordflow">if</span> (!lpItemText)</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="comment">         * These are strings so we are copying the text and we must include</span></div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="comment">         * the terminating 0 when doing the memmove.</span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        cchText = wcslen(lpItemText);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        <span class="keywordflow">if</span> (fLengthOnly) {</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;            <span class="keywordflow">if</span> (fAnsi)</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                RtlUnicodeToMultiByteSize(&amp;cchText, lpItemText, cchText*<span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">if</span> (fAnsi) {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                WCSToMB(lpItemText, cchText+1, &amp;((LPSTR)lpbuffer), cchText+1, FALSE);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                RtlCopyMemory(lpbuffer, lpItemText, (cchText+1)*<span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            }</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    }</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    <span class="keywordflow">return</span> cchText;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;}</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160; </div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="a00179.html#a39156553f0f7f9f6c206b1fc7525a6ae">  268</a></span>&#160;BOOL <a class="code" href="a00179.html#a39156553f0f7f9f6c206b1fc7525a6ae">GrowMem</a>(</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb)</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;{</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    LONG cb;</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    HANDLE hMem;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="comment">     * Allocate memory for pointers to the strings.</span></div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    cb = (plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> + CITEMSALLOC) *</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;            (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a01925.html">LBItem</a>)</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                              : (plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a1a0c8a4d04c1e16bcedb6e1e4f74053e">LBODItem</a>)</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                                              : 0));</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="comment">     * If multiple selection list box (MULTIPLESEL or EXTENDEDSEL), then</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="comment">     * allocate an extra byte per item to keep track of it&#39;s selection state.</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        cb += (plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> + CITEMSALLOC);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="comment">     * Extra bytes for each item so that we can store its height.</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        cb += (plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> + CITEMSALLOC);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    }</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;<span class="comment">     * Don&#39;t allocate more than 2G of memory</span></div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    <span class="keywordflow">if</span> (cb &gt; MAXLONG) <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> == NULL) {</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="keywordflow">if</span> ((plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = UserLocalAlloc(HEAP_ZERO_MEMORY, (LONG)cb)) == NULL)</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="keywordflow">if</span> ((hMem = UserLocalReAlloc(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>, (LONG)cb, HEAP_ZERO_MEMORY)) == NULL)</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = hMem;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160; </div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> += CITEMSALLOC;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;}</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="a00257.html#aee46d27b618699556e14057a090af117">  325</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a8ce1e80af8d4652d6c1b81ed2420b506">xxxLBInsertItem</a>(</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="comment">     * For owner draw listboxes without LBS_HASSTRINGS style, this is not a</span></div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;<span class="comment">     * string but rather a 4 byte value we will store for the app.</span></div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    LPWSTR lpsz,</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> index,</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wFlags)</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;{</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    MEASUREITEMSTRUCT measureItemStruct;</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cbString;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cbChunk;</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    PBYTE lp;</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    PBYTE lpT;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    PBYTE lpHeightStart;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    LONG cbItem;     <span class="comment">/* sizeof the Item in rgpch */</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    HANDLE hMem;</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpwndParent;</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160; </div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160; </div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="keywordflow">if</span> (wFlags &amp; LBI_ADD)</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        index = (plb-&gt;<a class="code" href="a01921.html#a24b6de31024474ff1550465e19d10ae6">fSort</a>) ? <a class="code" href="a00179.html#a77089c8a1f9db78b7517e7bb05c51216">xxxLBBinarySearchString</a>(plb, lpsz) : -1;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160; </div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>) {</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        <span class="keywordflow">if</span> (index != 0 &amp;&amp; index != -1) {</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;            <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_INDEX, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;            <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        }</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160; </div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> = -1;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a> = 0;</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> = 0;</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> = 0;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a> = 0;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = UserLocalAlloc(HEAP_ZERO_MEMORY, 0L);</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>)</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;            <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    }</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160; </div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    <span class="keywordflow">if</span> (index == -1) {</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        index = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;    }</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160; </div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    <span class="keywordflow">if</span> (index &gt; plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> || plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> &gt;= MAXLONG) {</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_INDEX, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    }</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160; </div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;<span class="comment">         * we must store the string in the hStrings memory block.</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        cbString = (wcslen(lpsz) + 1)*<span class="keyword">sizeof</span>(WCHAR);  <span class="comment">/* include 0 terminator */</span></div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160; </div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        <span class="keywordflow">if</span> ((cbChunk = (plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a> + cbString)) &gt; plb-&gt;<a class="code" href="a01921.html#aff609797da6f70a131cef68d7a77ba8d">cchStrings</a>) {</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;<span class="comment">             * Round up to the nearest 256 byte chunk.</span></div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            cbChunk = (cbChunk &amp; ~0xff) + 0x100;</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            <span class="keywordflow">if</span> (!(hMem = UserLocalReAlloc(plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a>, (LONG)cbChunk,</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;                    0))) {</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;                <a class="code" href="a00182.html#a3e0630367eb018bf40e9bbc5924249ba">xxxNotifyOwner</a>(plb, LBN_ERRSPACE);</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;                <span class="keywordflow">return</span> LB_ERRSPACE;</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            }</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;            plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a> = hMem;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160; </div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;            plb-&gt;<a class="code" href="a01921.html#aff609797da6f70a131cef68d7a77ba8d">cchStrings</a> = cbChunk;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;        }</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160; </div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;<span class="comment">         * Note difference between Win 95 code with placement of new string</span></div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="keywordflow">if</span> (wFlags &amp; UPPERCASE)</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;            <a class="code" href="a00269.html#af0c6e6ab165a8402677790d7b281c655">CharUpperBuffW</a>((LPWSTR)lpsz, cbString / <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (wFlags &amp; LOWERCASE)</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            <a class="code" href="a00269.html#a7b02672ade64f653ad94cdb65587ba63">CharLowerBuffW</a>((LPWSTR)lpsz, cbString / <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160; </div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        lp = (PBYTE)(plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a>);</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        memmove(lp + plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a>, lpsz, cbString);</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    }</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160; </div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="comment">     * Now expand the pointer array.</span></div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> &gt;= plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a>) {</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="a00179.html#a39156553f0f7f9f6c206b1fc7525a6ae">GrowMem</a>(plb)) {</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;            <a class="code" href="a00182.html#a3e0630367eb018bf40e9bbc5924249ba">xxxNotifyOwner</a>(plb, LBN_ERRSPACE);</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;            <span class="keywordflow">return</span> LB_ERRSPACE;</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        }</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    }</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160; </div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    lpHeightStart = lpT = lp = plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>;</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160; </div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;<span class="comment">     * Now calculate how much room we must make for the string pointer (lpsz).</span></div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;<span class="comment">     * If we are ownerdraw without LBS_HASSTRINGS, then a single DWORD</span></div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;<span class="comment">     * (LBODItem.itemData) stored for each item, but if we have strings with</span></div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;<span class="comment">     * each item then a LONG string offset (LBItem.offsz) is also stored.</span></div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    cbItem = (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>)</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;                               : (plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a01929.html">LBODItem</a>):0));</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    cbChunk = (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - index) * cbItem;</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160; </div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160; </div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;<span class="comment">         * Extra bytes were allocated for selection flag for each item</span></div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;        cbChunk += plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;    }</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160; </div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160; </div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;<span class="comment">         * Extra bytes were allocated for each item&#39;s height</span></div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;        cbChunk += plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    }</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160; </div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;<span class="comment">     * First, make room for the 2 byte pointer to the string or the 4 byte app</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;<span class="comment">     * supplied value.</span></div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    lpT += (index * cbItem);</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;    memmove(lpT + cbItem, lpT, cbChunk);</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> &amp;&amp; plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a>) {</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a>) {</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="comment">             * Ownerdraw so just save the DWORD value</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;            <a class="code" href="a01929.html">lpLBODItem</a> p = (<a class="code" href="a00257.html#a763f0a69a1a392a3db04ce31f8fbcbac">lpLBODItem</a>)lpT;</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;            p-&gt;<a class="code" href="a01929.html#a9390f7a1c66dcd4459c862b886656e67">itemData</a> = (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>)lpsz;</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        }</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;        <a class="code" href="a01925.html">lpLBItem</a> p = ((<a class="code" href="a00257.html#a7834189a4c8f8e19088773b593228d40">lpLBItem</a>)lpT);</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160; </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="comment">         * Save the start of the string.  Let the item data field be 0</span></div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;        p-&gt;<a class="code" href="a01925.html#af3803ede947055e0ca678fa0cbcc49e2">offsz</a> = (LONG)(plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a>);</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        p-&gt;<a class="code" href="a01925.html#a9390f7a1c66dcd4459c862b886656e67">itemData</a> = 0;</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a> += cbString;</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    }</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160; </div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;<span class="comment">     * Now if Multiple Selection lbox, we have to insert a selection status</span></div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;<span class="comment">     * byte.  If var height ownerdraw, then we also have to move up the height</span></div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;<span class="comment">     * bytes.</span></div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;        lpT = lp + ((plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> + 1) * cbItem) + index;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;        memmove(lpT + 1, lpT, plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - index +</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;                (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR ? plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> : 0));</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        *lpT = 0;  <span class="comment">/* fSelected = FALSE */</span></div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    }</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160; </div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;<span class="comment">     * Increment count of items in the listbox now before we send a message to</span></div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="comment">     * the app.</span></div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>++;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160; </div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="comment">     * If varheight ownerdraw, we much insert an extra byte for the item&#39;s</span></div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;<span class="comment">     * height.</span></div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160; </div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="comment">         * Variable height owner draw so we need to get the height of each item.</span></div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;        lpHeightStart += (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * cbItem) + index +</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;                (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> ? plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> : 0);</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160; </div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;        memmove(lpHeightStart + 1, lpHeightStart, plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1 - index);</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160; </div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;<span class="comment">         * Query for item height only if we are var height owner draw.</span></div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;        measureItemStruct.CtlType = ODT_LISTBOX;</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        measureItemStruct.CtlID = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>;</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        measureItemStruct.itemID = index;</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160; </div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;<span class="comment">         * System font height is default height</span></div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;        measureItemStruct.itemHeight = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)<a class="code" href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a>-&gt;<a class="code" href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">cySysFontChar</a>;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;        measureItemStruct.itemData = (long)lpsz;</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160; </div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;<span class="comment">         * If &quot;has strings&quot; then add the special thunk bit so the client data</span></div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;<span class="comment">         * will be thunked to a client side address.  LB_DIR sends a string</span></div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;<span class="comment">         * even if the listbox is not HASSTRINGS so we need to special</span></div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;<span class="comment">         * thunk this case.  HP Dashboard for windows send LB_DIR to a non</span></div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;<span class="comment">         * HASSTRINGS listbox needs the server string converted to client.</span></div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;<span class="comment">         * WOW needs to know about this situation as well so we mark the</span></div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;<span class="comment">         * previously uninitialized itemWidth as FLAT.</span></div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> || (wFlags &amp; MSGFLAG_SPECIAL_THUNK)) {</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;            measureItemStruct.itemWidth = MIFLAG_FLAT;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;        }</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160; </div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>, &amp;tlpwndParent);</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        SendMessage(HW(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>),</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;                WM_MEASUREITEM,</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                measureItemStruct.CtlID,</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;                (LONG)((LPMEASUREITEMSTRUCT)&amp;measureItemStruct));</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;        ThreadUnlock(&amp;tlpwndParent);</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        *lpHeightStart = (BYTE)measureItemStruct.itemHeight;</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    }</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160; </div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160; </div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;<span class="comment">     * If the item was inserted above the current selection then move</span></div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;<span class="comment">     * the selection down one as well.</span></div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    <span class="keywordflow">if</span> ((plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> == SINGLESEL) &amp;&amp; (plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> &gt;= index))</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a>++;</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160; </div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR)</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;        <a class="code" href="a00191.html#a01314a31f58530d70a807e14c5f1617f">LBSetCItemFullMax</a>(plb);</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160; </div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;<span class="comment">     * Check if scroll bars need to be shown/hidden</span></div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a> = TRUE;</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;    <a class="code" href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a>(plb);</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a> = FALSE;</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160; </div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    <a class="code" href="a00182.html#a048126fb97fc310aa085c2ba6d6f745d">xxxCheckRedraw</a>(plb, TRUE, index);</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160; </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <span class="keywordflow">return</span> index;</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;}</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160; </div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160; </div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160; </div>
<div class="line"><a name="l00579"></a><span class="lineno"><a class="line" href="a00179.html#a51153001c2f7b0374d297d45e59ab013">  579</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a51153001c2f7b0374d297d45e59ab013">LBlstrcmpi</a>(</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;    LPWSTR lpStr1,</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    LPWSTR lpStr2,</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwLocaleId)</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;{</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160; </div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;<span class="comment">     * NOTE: This function is written so as to reduce the number of calls</span></div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;<span class="comment">     * made to the costly IsCharAlphaNumeric() function because that might</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;<span class="comment">     * load a language module; It &#39;traps&#39; the most frequently occurring cases</span></div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;<span class="comment">     * like both strings starting with &#39;[&#39; or both strings NOT starting with &#39;[&#39;</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;<span class="comment">     * first and only in abosolutely necessary cases calls IsCharAlphaNumeric();</span></div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    <span class="keywordflow">if</span> (*lpStr1 == TEXT(<span class="charliteral">&#39;[&#39;</span>)) {</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;        <span class="keywordflow">if</span> (*lpStr2 == TEXT(<span class="charliteral">&#39;[&#39;</span>)) <span class="keywordflow">goto</span> LBL_End;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;        <span class="keywordflow">if</span> (IsCharAlphaNumeric(*lpStr2)) <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;    }</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160; </div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    <span class="keywordflow">if</span> ((*lpStr2 == TEXT(<span class="charliteral">&#39;[&#39;</span>)) &amp;&amp; IsCharAlphaNumeric(*lpStr1)) <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;LBL_End:</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <span class="keywordflow">return</span> (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)CompareStringW(</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;                    (LCID)dwLocaleId,</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;                    NORM_IGNORECASE,</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;                    lpStr1,</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;                    -1,</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;                    lpStr2,</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;                    -1</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;                    ) - 2;</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;}</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160; </div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160; </div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160; </div>
<div class="line"><a name="l00622"></a><span class="lineno"><a class="line" href="a00179.html#a77089c8a1f9db78b7517e7bb05c51216">  622</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a77089c8a1f9db78b7517e7bb05c51216">xxxLBBinarySearchString</a>(</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;    LPWSTR lpstr)</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;{</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;    BYTE *FAR *lprgpch;</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sortResult;</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;    COMPAREITEMSTRUCT cis;</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    LPWSTR pszLBBase;</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;    LPWSTR pszLB;</div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemhigh;</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemnew = 0;</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> itemlow = 0;</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpwndParent;</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160; </div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160; </div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160; </div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;    lprgpch = (BYTE *FAR *)(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>);</div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;        pszLBBase = plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a>;</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;    }</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160; </div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    itemhigh = plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1;</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    <span class="keywordflow">while</span> (itemlow &lt;= itemhigh) {</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;        itemnew = (itemhigh + itemlow) / 2;</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160; </div>
<div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160; </div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;<span class="comment">             * Searching for string matches.</span></div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;            pszLB = (LPWSTR)((LPSTR)pszLBBase + ((<a class="code" href="a00257.html#a7834189a4c8f8e19088773b593228d40">lpLBItem</a>)lprgpch)[itemnew].offsz);</div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;            sortResult = <a class="code" href="a00179.html#a51153001c2f7b0374d297d45e59ab013">LBlstrcmpi</a>(pszLB, lpstr, plb-&gt;<a class="code" href="a01921.html#a184cfe5bce5449060dfeedb44f9cc0dc">dwLocaleId</a>);</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160; </div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;<span class="comment">             * Send compare item messages to the parent for sorting</span></div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;            cis.CtlType = ODT_LISTBOX;</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;            cis.CtlID = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>;</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;            cis.hwndItem = HWq(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;            cis.itemID1 = itemnew;</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;            cis.itemData1 = ((<span class="keywordtype">long</span> FAR *)lprgpch)[itemnew];</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;            cis.itemID2 = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)-1;</div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;            cis.itemData2 = (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>)lpstr;</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;            cis.dwLocaleId = plb-&gt;<a class="code" href="a01921.html#a184cfe5bce5449060dfeedb44f9cc0dc">dwLocaleId</a>;</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;            <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>, &amp;tlpwndParent);</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;            sortResult = (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)SendMessage(HW(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>), WM_COMPAREITEM,</div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;                    cis.CtlID, (LONG)(LPCOMPAREITEMSTRUCT)&amp;cis);</div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;            ThreadUnlock(&amp;tlpwndParent);</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;        }</div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160; </div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;        <span class="keywordflow">if</span> (sortResult &lt; 0) {</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;            itemlow = itemnew + 1;</div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sortResult &gt; 0) {</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;            itemhigh = itemnew - 1;</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;            itemlow = itemnew;</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;            <span class="keywordflow">goto</span> FoundIt;</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;        }</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    }</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160; </div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;FoundIt:</div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160; </div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;    <span class="keywordflow">return</span> max(0, itemlow);</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;}</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160; </div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160; </div>
<div class="line"><a name="l00696"></a><span class="lineno"><a class="line" href="a00257.html#a394172430e46df98cecea85a2ca9df59">  696</a></span>&#160;BOOL <a class="code" href="a00179.html#a394172430e46df98cecea85a2ca9df59">xxxLBResetContent</a>(</div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb)</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;{</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;    <span class="keywordflow">if</span> (!plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>)</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160; </div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;    <a class="code" href="a00191.html#ae0928a0076e9bbd19ae79349bc7d9c8f">xxxLBoxDoDeleteItems</a>(plb);</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160; </div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> != NULL) {</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;        UserLocalFree(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>);</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;        plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = NULL;</div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    }</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160; </div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a> != NULL) {</div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;        UserLocalFree(plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a>);</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;        plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a> = NULL;</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;    }</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160; </div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    <a class="code" href="a00191.html#a5118c1516ab13f83da0d999f5fb6df8b">InitHStrings</a>(plb);</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160; </div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;    <span class="keywordflow">if</span> (TestWF(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, WFWIN31COMPAT))</div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;        <a class="code" href="a00182.html#a048126fb97fc310aa085c2ba6d6f745d">xxxCheckRedraw</a>(plb, FALSE, 0);</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a00365.html#ad3225ce06580cb58802233512f3d9c81">IsVisible</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>))</div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;        <a class="code" href="a00362.html#acfbb149ad39bc9929fb7063d4276e470">NtUserInvalidateRect</a>(HWq(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>), NULL, TRUE);</div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160; </div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;    plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a> =  0;</div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;    plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a> =  0;</div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> =  0;</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> =  0;</div>
<div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aaef455959b7907cbaff286e61c5e029b">xOrigin</a> =  0;</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a2ce25ccdb5a932ee4e4a66b2a9311714">iLastSelection</a> =  0;</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;    plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> = -1;</div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160; </div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;    <a class="code" href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a>(plb);</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;}</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160; </div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160; </div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160; </div>
<div class="line"><a name="l00741"></a><span class="lineno"><a class="line" href="a00257.html#af6cecf2f0e1da037a11516073bfd4fa1">  741</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a34ef470600d08b47b068c239f2dd7998">xxxLBoxCtlDelete</a>(</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sItem)  <span class="comment">/* Item number to delete */</span></div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;{</div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;    LONG cb;</div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;    LPBYTE lp;</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;    LPBYTE lpT;</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;    RECT rc;</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;    <span class="keywordtype">int</span> cbItem;    <span class="comment">/* size of Item in rgpch */</span></div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;    LPWSTR lpString;</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;    PBYTE pbStrings;</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cbStringLen;</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;    LPBYTE itemNumbers;</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sTmp;</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpwnd;</div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160; </div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160; </div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;    <span class="keywordflow">if</span> (sItem &lt; 0 || sItem &gt;= plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) {</div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_INVALID_INDEX, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;        <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;    }</div>
<div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160; </div>
<div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> == 1) {</div>
<div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160; </div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;<span class="comment">         * When the item count is 0, we send a resetcontent message so that we</span></div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;<span class="comment">         * can reclaim our string space this way.</span></div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;        <a class="code" href="a00041.html#a6bdc5311bb7640aba29656dd7bb4e71a">SendMessageWorker</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, LB_RESETCONTENT, 0, 0, FALSE);</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;        <span class="keywordflow">goto</span> FinishUpDelete;</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;    }</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160; </div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;<span class="comment">     * Get the rectangle associated with the last item in the listbox.  If it is</span></div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;<span class="comment">     * visible, we need to invalidate it.  When we delete an item, everything</span></div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;<span class="comment">     * scrolls up to replace the item deleted so we must make sure we erase the</span></div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;<span class="comment">     * old image of the last item in the listbox.</span></div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a>(plb, (<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>)(plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1), &amp;rc)) {</div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;        <a class="code" href="a00182.html#ad333a7027751ae3d3eb3b4e5ba986b80">xxxLBInvalidateRect</a>(plb, &amp;rc, TRUE);</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;    }</div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160; </div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;    <span class="comment">// 3.1 and earlier used to only send WM_DELETEITEMs if it was an ownerdraw</span></div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;    <span class="comment">// listbox.  4.0 and above will send WM_DELETEITEMs for every item that has</span></div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;    <span class="comment">// nonzero item data.</span></div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;    <span class="keywordflow">if</span> (TestWF(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, WFWIN40COMPAT) || (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> &amp;&amp; plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a>)) {</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;        <a class="code" href="a00179.html#ab2e31ed452170a40cc369b0607672f4e">xxxLBoxDeleteItem</a>(plb, sItem);</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;    }</div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160; </div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>--;</div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160; </div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;    cbItem = (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>)</div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;                               : (plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a01929.html">LBODItem</a>): 0));</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;    cb = ((plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - sItem) * cbItem);</div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160; </div>
<div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;<span class="comment">     * Byte for the selection status of the item.</span></div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;        cb += (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> + 1);</div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;    }</div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160; </div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160; </div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;<span class="comment">         * One byte for the height of the item.</span></div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;        cb += (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> + 1);</div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;    }</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160; </div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;<span class="comment">     * Might be nodata and singlesel, for instance.</span></div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;<span class="comment">     * but what out for the case where cItem == cMac (and cb == 0).</span></div>
<div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;    <span class="keywordflow">if</span> ((cb != 0) || plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;        lp = plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>;</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160; </div>
<div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;        lpT = (lp + (sItem * cbItem));</div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160; </div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;<span class="comment">             * If we has strings with each item, then we want to compact the string</span></div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;<span class="comment">             * heap so that we can recover the space occupied by the string of the</span></div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;<span class="comment">             * deleted item.</span></div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;<span class="comment">             * Get the string which we will be deleting</span></div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;            pbStrings = (PBYTE)(plb-&gt;<a class="code" href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">hStrings</a>);</div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;            lpString = (LPTSTR)(pbStrings + ((<a class="code" href="a01925.html">lpLBItem</a>)lpT)-&gt;offsz);</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;            cbStringLen = (wcslen(lpString) + 1) * <span class="keyword">sizeof</span>(WCHAR);  <span class="comment">/* include null terminator */</span></div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160; </div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;<span class="comment">             * Now compact the string array</span></div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a> = plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a> - cbStringLen;</div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160; </div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;            memmove(lpString, (PBYTE)lpString + cbStringLen,</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;                    plb-&gt;<a class="code" href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">ichAlloc</a> + (pbStrings - (LPBYTE)lpString));</div>
<div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160; </div>
<div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;<span class="comment">             * We have to update the string pointers in plb-&gt;rgpch since all the</span></div>
<div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;<span class="comment">             * string after the deleted string have been moved down stringLength</span></div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;<span class="comment">             * bytes.  Note that we have to explicitly check all items in the list</span></div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;<span class="comment">             * box if the string was allocated after the deleted item since the</span></div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;<span class="comment">             * LB_SORT style allows a lower item number to have a string allocated</span></div>
<div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;<span class="comment">             * at the end of the string heap for example.</span></div>
<div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;            itemNumbers = lp;</div>
<div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;            <span class="keywordflow">for</span> (sTmp = 0; sTmp &lt;= plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>; sTmp++) {</div>
<div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;                <a class="code" href="a01925.html">lpLBItem</a> p =(<a class="code" href="a00257.html#a7834189a4c8f8e19088773b593228d40">lpLBItem</a>)itemNumbers;</div>
<div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;                <span class="keywordflow">if</span> ( (LPTSTR)(p-&gt;<a class="code" href="a01925.html#af3803ede947055e0ca678fa0cbcc49e2">offsz</a> + pbStrings) &gt; lpString ) {</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;                    p-&gt;<a class="code" href="a01925.html#af3803ede947055e0ca678fa0cbcc49e2">offsz</a> -= cbStringLen;</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;                }</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;                p++;</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;                itemNumbers=(LPBYTE)p;</div>
<div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;            }</div>
<div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;        }</div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160; </div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;<span class="comment">         * Now compact the pointers to the strings (or the long app supplied values</span></div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;<span class="comment">         * if ownerdraw without strings).</span></div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;        memmove(lpT, lpT + cbItem, cb);</div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160; </div>
<div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;<span class="comment">         * Compress the multiselection bytes</span></div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;            lpT = (lp + (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * cbItem) + sItem);</div>
<div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;            memmove(lpT, lpT + 1, plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - sItem +</div>
<div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;                    (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR ? plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> + 1 : 0));</div>
<div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;        }</div>
<div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160; </div>
<div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;<span class="comment">             * Compress the height bytes</span></div>
<div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;            lpT = (lp + (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> * cbItem) + (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> ? plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> : 0)</div>
<div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;                    + sItem);</div>
<div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;            memmove(lpT, lpT + 1, plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - sItem);</div>
<div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;        }</div>
<div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160; </div>
<div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;    }</div>
<div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160; </div>
<div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> == SINGLESEL) {</div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> == sItem) {</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;            plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> = -1;</div>
<div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160; </div>
<div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;            <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a0c0967f12b88efa3c64b143a35789575">pcbox</a> != NULL) {</div>
<div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;                <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(plb-&gt;<a class="code" href="a01921.html#a0c0967f12b88efa3c64b143a35789575">pcbox</a>-&gt;<a class="code" href="a01889.html#a68937d60a6f49b7a8431db62b38ea721">spwnd</a>, &amp;tlpwnd);</div>
<div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;                <a class="code" href="a00053.html#a555359bed985fd162e95fb27f67d2db3">xxxCBInternalUpdateEditWindow</a>(plb-&gt;<a class="code" href="a01921.html#a0c0967f12b88efa3c64b143a35789575">pcbox</a>, NULL);</div>
<div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;                ThreadUnlock(&amp;tlpwnd);</div>
<div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;            }</div>
<div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> &gt; sItem)</div>
<div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;            plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a>--;</div>
<div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;    }</div>
<div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160; </div>
<div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;    <span class="keywordflow">if</span> ((plb-&gt;<a class="code" href="a01921.html#abf52a6d63a553ed418bada12c9b2417b">iMouseDown</a> != -1) &amp;&amp; (sItem &lt;= plb-&gt;iMouseDown))</div>
<div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;        plb-&gt;<a class="code" href="a01921.html#abf52a6d63a553ed418bada12c9b2417b">iMouseDown</a> = -1;</div>
<div class="line"><a name="l00902"></a><span class="lineno">  902</span>&#160; </div>
<div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;    <span class="keywordflow">if</span> (sItem == plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a>)</div>
<div class="line"><a name="l00904"></a><span class="lineno">  904</span>&#160;        plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a>--;</div>
<div class="line"><a name="l00905"></a><span class="lineno">  905</span>&#160; </div>
<div class="line"><a name="l00906"></a><span class="lineno">  906</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>) {</div>
<div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;        plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a> = min(plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a>, plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> - 1);</div>
<div class="line"><a name="l00908"></a><span class="lineno">  908</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;        plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a> = 0;</div>
<div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;    }</div>
<div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160; </div>
<div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;    <span class="keywordflow">if</span> ((plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> == EXTENDEDSEL) &amp;&amp; (plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> == -1))</div>
<div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;        plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> = plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a>;</div>
<div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160; </div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR)</div>
<div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;        <a class="code" href="a00191.html#a01314a31f58530d70a807e14c5f1617f">LBSetCItemFullMax</a>(plb);</div>
<div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160; </div>
<div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;<span class="comment">     * We always set a new iTop.  The iTop won&#39;t change if it doesn&#39;t need to</span></div>
<div class="line"><a name="l00920"></a><span class="lineno">  920</span>&#160;<span class="comment">     * but it will change if:  1.  The iTop was deleted or 2.  We need to change</span></div>
<div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;<span class="comment">     * the iTop so that we fill the listbox.</span></div>
<div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;    <a class="code" href="a00182.html#ac49ebe397493c9908b4f22eadd65d5f6">xxxInsureVisible</a>(plb, plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a>, FALSE);</div>
<div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160; </div>
<div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;FinishUpDelete:</div>
<div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160; </div>
<div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;<span class="comment">     * Check if scroll bars need to be shown/hidden</span></div>
<div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a> = TRUE;</div>
<div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;    <a class="code" href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a>(plb);</div>
<div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">fFromInsert</a> = FALSE;</div>
<div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160; </div>
<div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;    <a class="code" href="a00182.html#a048126fb97fc310aa085c2ba6d6f745d">xxxCheckRedraw</a>(plb, TRUE, sItem);</div>
<div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;    <a class="code" href="a00182.html#ac49ebe397493c9908b4f22eadd65d5f6">xxxInsureVisible</a>(plb, plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a>, FALSE);</div>
<div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160; </div>
<div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;    <span class="keywordflow">return</span> plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a>;</div>
<div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;}</div>
<div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160; </div>
<div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160; </div>
<div class="line"><a name="l00948"></a><span class="lineno"><a class="line" href="a00257.html#a45b19612cabba1591e4a8918bf3a0f16">  948</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00179.html#ab2e31ed452170a40cc369b0607672f4e">xxxLBoxDeleteItem</a>(</div>
<div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> sItem)</div>
<div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;{</div>
<div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;    DELETEITEMSTRUCT dis;</div>
<div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpwndParent;</div>
<div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160; </div>
<div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a> == NULL)</div>
<div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160; </div>
<div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;<span class="comment">     * Fill the DELETEITEMSTRUCT</span></div>
<div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;    dis.CtlType = ODT_LISTBOX;</div>
<div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;    dis.CtlID = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>;</div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;    dis.itemID = sItem;</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;    dis.hwndItem = HWq(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160; </div>
<div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;<span class="comment">     * Set the app supplied data</span></div>
<div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a>) {</div>
<div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;        dis.itemData = 0L;</div>
<div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;        <a class="code" href="a00179.html#a25a104b0d4db7572f113386362e33e05">LBGetText</a>(plb, FALSE, FALSE, sItem, (LPWSTR)&amp;dis.itemData);</div>
<div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;    }</div>
<div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160; </div>
<div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a> != NULL) {</div>
<div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;        <a class="code" href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a>(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>, &amp;tlpwndParent);</div>
<div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;        SendMessage(HW(plb-&gt;<a class="code" href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">spwndParent</a>), WM_DELETEITEM, dis.CtlID,</div>
<div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;                (LONG)((LPDELETEITEMSTRUCT)&amp;dis));</div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;        ThreadUnlock(&amp;tlpwndParent);</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;    }</div>
<div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;}</div>
<div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160; </div>
<div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160; </div>
<div class="line"><a name="l00996"></a><span class="lineno"><a class="line" href="a00257.html#aab9f1ac6d3cf3f27357010a006de93d8">  996</a></span>&#160;<a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> <a class="code" href="a00179.html#a45a55a5d03d4edb5c9a7326a53c50064">xxxLBSetCount</a>(</div>
<div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cItems)</div>
<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;{</div>
<div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>  cbRequired;</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;    BOOL    fRedraw;</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160; </div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>);</div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160; </div>
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;<span class="comment">     * SetCount is only valid on lazy-eval (&quot;nodata&quot;) listboxes.</span></div>
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;<span class="comment">     * All other lboxen must add their items one at a time, although</span></div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;<span class="comment">     * they may SetCount(0) via RESETCONTENT.</span></div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> || plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a>) {</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_SETCOUNT_ON_BAD_LB, <a class="code" href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;        <span class="keywordflow">return</span> LB_ERR;</div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;    }</div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160; </div>
<div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;    <span class="keywordflow">if</span> (cItems == 0) {</div>
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;        <a class="code" href="a00041.html#a6bdc5311bb7640aba29656dd7bb4e71a">SendMessageWorker</a>(plb-&gt;<a class="code" href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">spwnd</a>, LB_RESETCONTENT, 0, 0, FALSE);</div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;    }</div>
<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160; </div>
<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;    <span class="comment">// If redraw isn&#39;t turned off, turn it off now</span></div>
<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;    <span class="keywordflow">if</span> (fRedraw = plb-&gt;<a class="code" href="a01921.html#abae0c031d21e87807959f436a83ce8a4">fRedraw</a>)</div>
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;        <a class="code" href="a00182.html#a3c35b7b60a115cd322fc1fb90a09b964">xxxLBSetRedraw</a>(plb, FALSE);</div>
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160; </div>
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;    cbRequired = <a class="code" href="a00179.html#a1b915647bff6cee4043bc4b0025c1535">LBCalcAllocNeeded</a>(plb, cItems);</div>
<div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160; </div>
<div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;<span class="comment">     * Reset selection and position</span></div>
<div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;    plb-&gt;<a class="code" href="a01921.html#adf215a463519586b3a5202285100f6ab">iSelBase</a> = 0;</div>
<div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;    plb-&gt;<a class="code" href="a01921.html#ab84d959c8cc5598602cd735047f91f06">iTop</a> = 0;</div>
<div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> = 0;</div>
<div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aaef455959b7907cbaff286e61c5e029b">xOrigin</a> = 0;</div>
<div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;    plb-&gt;<a class="code" href="a01921.html#a2ce25ccdb5a932ee4e4a66b2a9311714">iLastSelection</a> = 0;</div>
<div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;    plb-&gt;<a class="code" href="a01921.html#ad51e2455d51f0327e18d4b156690db26">iSel</a> = -1;</div>
<div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160; </div>
<div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;    <span class="keywordflow">if</span> (cbRequired != 0) { <span class="comment">// Only if record instance data required</span></div>
<div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160; </div>
<div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;<span class="comment">         * If listbox was previously empty, prepare for the</span></div>
<div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;<span class="comment">         * realloc-based alloc strategy ahead.</span></div>
<div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;        <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> == NULL) {</div>
<div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = UserLocalAlloc(HEAP_ZERO_MEMORY, 0L);</div>
<div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> = 0;</div>
<div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160; </div>
<div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;            <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> == NULL) {</div>
<div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;                <a class="code" href="a00182.html#a3e0630367eb018bf40e9bbc5924249ba">xxxNotifyOwner</a>(plb, LBN_ERRSPACE);</div>
<div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;                <span class="keywordflow">return</span> LB_ERRSPACE;</div>
<div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;            }</div>
<div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;        }</div>
<div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160; </div>
<div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;<span class="comment">         * rgpch might not have enough room for the new record instance</span></div>
<div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;<span class="comment">         * data, so check and realloc as necessary.</span></div>
<div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;        <span class="keywordflow">if</span> (cItems &gt;= plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a>) {</div>
<div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;            <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a>    cMaxNew;</div>
<div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160;            <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>   cbNew;</div>
<div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;            HANDLE hmemNew;</div>
<div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160; </div>
<div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;<span class="comment">             * Since GrowMem presumes a one-item-at-a-time add schema,</span></div>
<div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;<span class="comment">             * SetCount can&#39;t use it.  Too bad.</span></div>
<div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;            cMaxNew = cItems+CITEMSALLOC;</div>
<div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;            cbNew = <a class="code" href="a00179.html#a1b915647bff6cee4043bc4b0025c1535">LBCalcAllocNeeded</a>(plb, cMaxNew);</div>
<div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;            hmemNew = UserLocalReAlloc(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>, cbNew, HEAP_ZERO_MEMORY);</div>
<div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160; </div>
<div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;            <span class="keywordflow">if</span> (hmemNew == NULL) {</div>
<div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;                <a class="code" href="a00182.html#a3e0630367eb018bf40e9bbc5924249ba">xxxNotifyOwner</a>(plb, LBN_ERRSPACE);</div>
<div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;                <span class="keywordflow">return</span> LB_ERRSPACE;</div>
<div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160;            }</div>
<div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>&#160; </div>
<div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a> = hmemNew;</div>
<div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160;            plb-&gt;<a class="code" href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">cMax</a> = cMaxNew;</div>
<div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160;        }</div>
<div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160; </div>
<div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160;<span class="comment">         * Reset the item instance data (multisel annotations)</span></div>
<div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160;        RtlZeroMemory(plb-&gt;<a class="code" href="a01921.html#a7180230449158127a3f88b1441f673f2">rgpch</a>, cbRequired);</div>
<div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160;    }</div>
<div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160; </div>
<div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160;    plb-&gt;<a class="code" href="a01921.html#aa846f9b41c896f518fb18a97307280f2">cMac</a> = cItems;</div>
<div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160; </div>
<div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160;    <span class="comment">// Turn redraw back on</span></div>
<div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160;    <span class="keywordflow">if</span> (fRedraw)</div>
<div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160;        <a class="code" href="a00182.html#a3c35b7b60a115cd322fc1fb90a09b964">xxxLBSetRedraw</a>(plb, TRUE);</div>
<div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160; </div>
<div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;    <a class="code" href="a00182.html#ad333a7027751ae3d3eb3b4e5ba986b80">xxxLBInvalidateRect</a>(plb, NULL, TRUE);</div>
<div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160;<span class="comment">// Not In Chicago -- FritzS</span></div>
<div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160;<span class="comment">//    NtUserSetScrollPos(plb-&gt;spwnd, SB_HORZ, 0, plb-&gt;fRedraw);</span></div>
<div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;<span class="comment">//    NtUserSetScrollPos(plb-&gt;spwnd, SB_VERT, 0, plb-&gt;fRedraw);</span></div>
<div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;    <a class="code" href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a>(plb); <span class="comment">// takes care of fRedraw</span></div>
<div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160; </div>
<div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160;}</div>
<div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160; </div>
<div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160; </div>
<div class="line"><a name="l01109"></a><span class="lineno"><a class="line" href="a00257.html#a8e4498683a633089d1796333be94ae62"> 1109</a></span>&#160;<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> <a class="code" href="a00179.html#a1b915647bff6cee4043bc4b0025c1535">LBCalcAllocNeeded</a>(</div>
<div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160;    <a class="code" href="a01921.html">PLBIV</a> plb,</div>
<div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160;    <a class="code" href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a> cItems)</div>
<div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160;{</div>
<div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> cb;</div>
<div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160; </div>
<div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160;<span class="comment">     * Allocate memory for pointers to the strings.</span></div>
<div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160;    cb = cItems * (plb-&gt;<a class="code" href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">fHasStrings</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a>)</div>
<div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;                                    : (plb-&gt;<a class="code" href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">fHasData</a> ? <span class="keyword">sizeof</span>(<a class="code" href="a01929.html">LBODItem</a>)</div>
<div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;                                                    : 0));</div>
<div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>&#160; </div>
<div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;<span class="comment">     * If multiple selection list box (MULTIPLESEL or EXTENDEDSEL), then</span></div>
<div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160;<span class="comment">     * allocate an extra byte per item to keep track of it&#39;s selection state.</span></div>
<div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">wMultiple</a> != SINGLESEL) {</div>
<div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>&#160;        cb += cItems;</div>
<div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>&#160;    }</div>
<div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160; </div>
<div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160;<span class="comment">     * Extra bytes for each item so that we can store its height.</span></div>
<div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160;    <span class="keywordflow">if</span> (plb-&gt;<a class="code" href="a01921.html#a10cabd3870f697deba5823036713c506">OwnerDraw</a> == OWNERDRAWVAR) {</div>
<div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;        cb += cItems;</div>
<div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160;    }</div>
<div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160; </div>
<div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160;    <span class="keywordflow">return</span> cb;</div>
<div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa01889_html_a68937d60a6f49b7a8431db62b38ea721"><div class="ttname"><a href="a01889.html#a68937d60a6f49b7a8431db62b38ea721">tagCBox::spwnd</a></div><div class="ttdeci">struct tagWND * spwnd</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00450">usercli.h:450</a></div></div>
<div class="ttc" id="aa00182_html_ad61fcc3b7a00278894d43eb819ed5b3d"><div class="ttname"><a href="a00182.html#ad61fcc3b7a00278894d43eb819ed5b3d">LBGetItemRect</a></div><div class="ttdeci">BOOL LBGetItemRect(PLBIV plb, INT sItem, LPRECT lprc)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00177">lboxctl2.c:177</a></div></div>
<div class="ttc" id="aa00041_html_a6bdc5311bb7640aba29656dd7bb4e71a"><div class="ttname"><a href="a00041.html#a6bdc5311bb7640aba29656dd7bb4e71a">SendMessageWorker</a></div><div class="ttdeci">LONG SendMessageWorker(PWND pwnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL fAnsi)</div><div class="ttdef"><b>Definition:</b> <a href="a00041_source.html#l00258">clmsg.c:258</a></div></div>
<div class="ttc" id="aa01921_html_aa9348d44e90566be977ce510adab2424"><div class="ttname"><a href="a01921.html#aa9348d44e90566be977ce510adab2424">tagLBIV::fVertInitialized</a></div><div class="ttdeci">UINT fVertInitialized</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00944">usercli.h:944</a></div></div>
<div class="ttc" id="aa00257_html_a763f0a69a1a392a3db04ce31f8fbcbac"><div class="ttname"><a href="a00257.html#a763f0a69a1a392a3db04ce31f8fbcbac">lpLBODItem</a></div><div class="ttdeci">struct tagLBODItem * lpLBODItem</div></div>
<div class="ttc" id="aa01925_html_af3803ede947055e0ca678fa0cbcc49e2"><div class="ttname"><a href="a01925.html#af3803ede947055e0ca678fa0cbcc49e2">tagLBItem::offsz</a></div><div class="ttdeci">LONG offsz</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l01022">usercli.h:1022</a></div></div>
<div class="ttc" id="aa00191_html_a5118c1516ab13f83da0d999f5fb6df8b"><div class="ttname"><a href="a00191.html#a5118c1516ab13f83da0d999f5fb6df8b">InitHStrings</a></div><div class="ttdeci">void InitHStrings(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00712">lboxrare.c:712</a></div></div>
<div class="ttc" id="aa01921_html"><div class="ttname"><a href="a01921.html">tagLBIV</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00866">usercli.h:866</a></div></div>
<div class="ttc" id="aa00179_html_a77089c8a1f9db78b7517e7bb05c51216"><div class="ttname"><a href="a00179.html#a77089c8a1f9db78b7517e7bb05c51216">xxxLBBinarySearchString</a></div><div class="ttdeci">INT xxxLBBinarySearchString(PLBIV plb, LPWSTR lpstr)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00622">lboxctl1.c:622</a></div></div>
<div class="ttc" id="aa00179_html_ab2e31ed452170a40cc369b0607672f4e"><div class="ttname"><a href="a00179.html#ab2e31ed452170a40cc369b0607672f4e">xxxLBoxDeleteItem</a></div><div class="ttdeci">void xxxLBoxDeleteItem(PLBIV plb, INT sItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00948">lboxctl1.c:948</a></div></div>
<div class="ttc" id="aa00179_html_ab88cd7027b6acd69d6c39d4eac56cc53"><div class="ttname"><a href="a00179.html#ab88cd7027b6acd69d6c39d4eac56cc53">xxxSetLBScrollParms</a></div><div class="ttdeci">int xxxSetLBScrollParms(PLBIV plb, int nCtl)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00026">lboxctl1.c:26</a></div></div>
<div class="ttc" id="aa01921_html_a184cfe5bce5449060dfeedb44f9cc0dc"><div class="ttname"><a href="a01921.html#a184cfe5bce5449060dfeedb44f9cc0dc">tagLBIV::dwLocaleId</a></div><div class="ttdeci">DWORD dwLocaleId</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00969">usercli.h:969</a></div></div>
<div class="ttc" id="aa01921_html_aa846f9b41c896f518fb18a97307280f2"><div class="ttname"><a href="a01921.html#aa846f9b41c896f518fb18a97307280f2">tagLBIV::cMac</a></div><div class="ttdeci">INT cMac</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00876">usercli.h:876</a></div></div>
<div class="ttc" id="aa01921_html_a564b3833691426f4291fbbae1c9f9dc6"><div class="ttname"><a href="a01921.html#a564b3833691426f4291fbbae1c9f9dc6">tagLBIV::VPos</a></div><div class="ttdeci">SCROLLPOS VPos</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00973">usercli.h:973</a></div></div>
<div class="ttc" id="aa00179_html_a45a55a5d03d4edb5c9a7326a53c50064"><div class="ttname"><a href="a00179.html#a45a55a5d03d4edb5c9a7326a53c50064">xxxLBSetCount</a></div><div class="ttdeci">INT xxxLBSetCount(PLBIV plb, INT cItems)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00996">lboxctl1.c:996</a></div></div>
<div class="ttc" id="aa00371_html_ad6b24a3d61abdc148c8751b5c5add686"><div class="ttname"><a href="a00371.html#ad6b24a3d61abdc148c8751b5c5add686">RIP_VERBOSE</a></div><div class="ttdeci">#define RIP_VERBOSE</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00030">winerrp.h:30</a></div></div>
<div class="ttc" id="aa00179_html_a25a104b0d4db7572f113386362e33e05"><div class="ttname"><a href="a00179.html#a25a104b0d4db7572f113386362e33e05">LBGetText</a></div><div class="ttdeci">INT LBGetText(PLBIV plb, BOOL fLengthOnly, BOOL fAnsi, INT index, LPWSTR lpbuffer)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00206">lboxctl1.c:206</a></div></div>
<div class="ttc" id="aa01921_html_a0c0967f12b88efa3c64b143a35789575"><div class="ttname"><a href="a01921.html#a0c0967f12b88efa3c64b143a35789575">tagLBIV::pcbox</a></div><div class="ttdeci">PCBOX pcbox</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00967">usercli.h:967</a></div></div>
<div class="ttc" id="aa00179_html_a51153001c2f7b0374d297d45e59ab013"><div class="ttname"><a href="a00179.html#a51153001c2f7b0374d297d45e59ab013">LBlstrcmpi</a></div><div class="ttdeci">INT LBlstrcmpi(LPWSTR lpStr1, LPWSTR lpStr2, DWORD dwLocaleId)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00579">lboxctl1.c:579</a></div></div>
<div class="ttc" id="aa01921_html_ad26857fa34502b7c3be7f4ea963adcc2"><div class="ttname"><a href="a01921.html#ad26857fa34502b7c3be7f4ea963adcc2">tagLBIV::itemsPerColumn</a></div><div class="ttdeci">INT itemsPerColumn</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00887">usercli.h:887</a></div></div>
<div class="ttc" id="aa00182_html_a3c35b7b60a115cd322fc1fb90a09b964"><div class="ttname"><a href="a00182.html#a3c35b7b60a115cd322fc1fb90a09b964">xxxLBSetRedraw</a></div><div class="ttdeci">void xxxLBSetRedraw(PLBIV plb, BOOL fRedraw)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l02925">lboxctl2.c:2925</a></div></div>
<div class="ttc" id="aa00953_html_a392e62da233ed3e2f7c3fd4f487a3896"><div class="ttname"><a href="a00953.html#a392e62da233ed3e2f7c3fd4f487a3896">INT</a></div><div class="ttdeci">int INT</div><div class="ttdef"><b>Definition:</b> <a href="a00953_source.html#l00006">bench.c:6</a></div></div>
<div class="ttc" id="aa01921_html_a50322b89309802e9bdbefe0884dea9ca"><div class="ttname"><a href="a01921.html#a50322b89309802e9bdbefe0884dea9ca">tagLBIV::fHorzInitialized</a></div><div class="ttdeci">UINT fHorzInitialized</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00943">usercli.h:943</a></div></div>
<div class="ttc" id="aa01929_html_a9390f7a1c66dcd4459c862b886656e67"><div class="ttname"><a href="a01929.html#a9390f7a1c66dcd4459c862b886656e67">tagLBODItem::itemData</a></div><div class="ttdeci">DWORD itemData</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l01027">usercli.h:1027</a></div></div>
<div class="ttc" id="aa00257_html_a1a0c8a4d04c1e16bcedb6e1e4f74053e"><div class="ttname"><a href="a00257.html#a1a0c8a4d04c1e16bcedb6e1e4f74053e">LBODItem</a></div><div class="ttdeci">struct tagLBODItem LBODItem</div></div>
<div class="ttc" id="aa01921_html_a2ce25ccdb5a932ee4e4a66b2a9311714"><div class="ttname"><a href="a01921.html#a2ce25ccdb5a932ee4e4a66b2a9311714">tagLBIV::iLastSelection</a></div><div class="ttdeci">INT iLastSelection</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00951">usercli.h:951</a></div></div>
<div class="ttc" id="aa00182_html_ab4fb2819fdd86c30f99e14e003eff202"><div class="ttname"><a href="a00182.html#ab4fb2819fdd86c30f99e14e003eff202">xxxLBoxCtlHScroll</a></div><div class="ttdeci">void xxxLBoxCtlHScroll(PLBIV plb, INT cmd, int xAmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00611">lboxctl2.c:611</a></div></div>
<div class="ttc" id="aa00176_html_af8fe5eea4ff2e080e2f80ff86719a3c8"><div class="ttname"><a href="a00176.html#af8fe5eea4ff2e080e2f80ff86719a3c8">GetLpszItem</a></div><div class="ttdeci">LPWSTR GetLpszItem(PLBIV pLBIV, INT sItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00176_source.html#l00812">lb1.c:812</a></div></div>
<div class="ttc" id="aa00182_html_a048126fb97fc310aa085c2ba6d6f745d"><div class="ttname"><a href="a00182.html#a048126fb97fc310aa085c2ba6d6f745d">xxxCheckRedraw</a></div><div class="ttdeci">void xxxCheckRedraw(PLBIV plb, BOOL fConditional, INT sItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l03127">lboxctl2.c:3127</a></div></div>
<div class="ttc" id="aa01929_html"><div class="ttname"><a href="a01929.html">tagLBODItem</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l01026">usercli.h:1026</a></div></div>
<div class="ttc" id="aa01921_html_ac78ad025d5ad2100193d42ab9c1a963e"><div class="ttname"><a href="a01921.html#ac78ad025d5ad2100193d42ab9c1a963e">tagLBIV::maxWidth</a></div><div class="ttdeci">int maxWidth</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00965">usercli.h:965</a></div></div>
<div class="ttc" id="aa01921_html_aff609797da6f70a131cef68d7a77ba8d"><div class="ttname"><a href="a01921.html#aff609797da6f70a131cef68d7a77ba8d">tagLBIV::cchStrings</a></div><div class="ttdeci">INT cchStrings</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00881">usercli.h:881</a></div></div>
<div class="ttc" id="aa01921_html_a7180230449158127a3f88b1441f673f2"><div class="ttname"><a href="a01921.html#a7180230449158127a3f88b1441f673f2">tagLBIV::rgpch</a></div><div class="ttdeci">PBYTE rgpch</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00879">usercli.h:879</a></div></div>
<div class="ttc" id="aa01917_html"><div class="ttname"><a href="a01917.html">_SCROLLPOS</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00858">usercli.h:858</a></div></div>
<div class="ttc" id="aa00179_html_a39156553f0f7f9f6c206b1fc7525a6ae"><div class="ttname"><a href="a00179.html#a39156553f0f7f9f6c206b1fc7525a6ae">GrowMem</a></div><div class="ttdeci">BOOL GrowMem(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00268">lboxctl1.c:268</a></div></div>
<div class="ttc" id="aa01917_html_acc0a73612ab9f5683ec1f2af53dcdca0"><div class="ttname"><a href="a01917.html#acc0a73612ab9f5683ec1f2af53dcdca0">_SCROLLPOS::cItems</a></div><div class="ttdeci">INT cItems</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00859">usercli.h:859</a></div></div>
<div class="ttc" id="aa00371_html_ae61d954062a9ece52e350e54cad9a23d"><div class="ttname"><a href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a></div><div class="ttdeci">#define RIPERR0(idErr, flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00119">winerrp.h:119</a></div></div>
<div class="ttc" id="aa00899_html_abfae1dfb48db23dcea4494f7990ad6a6"><div class="ttname"><a href="a00899.html#abfae1dfb48db23dcea4494f7990ad6a6">ThreadLock</a></div><div class="ttdeci">VOID ThreadLock(PVOID pobj, PTL ptl)</div></div>
<div class="ttc" id="aa00257_html_a7834189a4c8f8e19088773b593228d40"><div class="ttname"><a href="a00257.html#a7834189a4c8f8e19088773b593228d40">lpLBItem</a></div><div class="ttdeci">struct tagLBItem * lpLBItem</div></div>
<div class="ttc" id="aa01921_html_a9a44c9750003967e35e3e9618dbb9f9f"><div class="ttname"><a href="a01921.html#a9a44c9750003967e35e3e9618dbb9f9f">tagLBIV::wMultiple</a></div><div class="ttdeci">UINT wMultiple</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00895">usercli.h:895</a></div></div>
<div class="ttc" id="aa01921_html_ad608b48791acd2c231c3e7b7bcf69067"><div class="ttname"><a href="a01921.html#ad608b48791acd2c231c3e7b7bcf69067">tagLBIV::fHasData</a></div><div class="ttdeci">UINT fHasData</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00912">usercli.h:912</a></div></div>
<div class="ttc" id="aa01921_html_a24b6de31024474ff1550465e19d10ae6"><div class="ttname"><a href="a01921.html#a24b6de31024474ff1550465e19d10ae6">tagLBIV::fSort</a></div><div class="ttdeci">UINT fSort</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00900">usercli.h:900</a></div></div>
<div class="ttc" id="aa00179_html_a991eafcaf220c88b32c3bba40a8ed01c"><div class="ttname"><a href="a00179.html#a991eafcaf220c88b32c3bba40a8ed01c">xxxLBShowHideScrollBars</a></div><div class="ttdeci">void xxxLBShowHideScrollBars(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00117">lboxctl1.c:117</a></div></div>
<div class="ttc" id="aa00053_html_a555359bed985fd162e95fb27f67d2db3"><div class="ttname"><a href="a00053.html#a555359bed985fd162e95fb27f67d2db3">xxxCBInternalUpdateEditWindow</a></div><div class="ttdeci">void xxxCBInternalUpdateEditWindow(PCBOX pcbox, HDC hdcPaint)</div><div class="ttdef"><b>Definition:</b> <a href="a00053_source.html#l01795">combo.c:1795</a></div></div>
<div class="ttc" id="aa00191_html_ae0928a0076e9bbd19ae79349bc7d9c8f"><div class="ttname"><a href="a00191.html#ae0928a0076e9bbd19ae79349bc7d9c8f">xxxLBoxDoDeleteItems</a></div><div class="ttdeci">void xxxLBoxDoDeleteItems(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00348">lboxrare.c:348</a></div></div>
<div class="ttc" id="aa01921_html_a6a3968fe577caa510feabc8750b8ae60"><div class="ttname"><a href="a01921.html#a6a3968fe577caa510feabc8750b8ae60">tagLBIV::ichAlloc</a></div><div class="ttdeci">INT ichAlloc</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00882">usercli.h:882</a></div></div>
<div class="ttc" id="aa01925_html"><div class="ttname"><a href="a01925.html">tagLBItem</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l01021">usercli.h:1021</a></div></div>
<div class="ttc" id="aa01921_html_a0ea0e3d0637c09a5fab41ab4568caa05"><div class="ttname"><a href="a01921.html#a0ea0e3d0637c09a5fab41ab4568caa05">tagLBIV::cMax</a></div><div class="ttdeci">INT cMax</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00877">usercli.h:877</a></div></div>
<div class="ttc" id="aa01921_html_a594afd187a730d79a889985d8f3c8d73"><div class="ttname"><a href="a01921.html#a594afd187a730d79a889985d8f3c8d73">tagLBIV::HPos</a></div><div class="ttdeci">SCROLLPOS HPos</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00972">usercli.h:972</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa00182_html_ad333a7027751ae3d3eb3b4e5ba986b80"><div class="ttname"><a href="a00182.html#ad333a7027751ae3d3eb3b4e5ba986b80">xxxLBInvalidateRect</a></div><div class="ttdeci">BOOL xxxLBInvalidateRect(PLBIV plb, LPRECT lprc, BOOL fErase)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l00036">lboxctl2.c:36</a></div></div>
<div class="ttc" id="aa02581_html_ad680eabbc65eb4d160362e2c73a19994"><div class="ttname"><a href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">tagWND::spmenu</a></div><div class="ttdeci">struct tagMENU * spmenu</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01413">user.h:1413</a></div></div>
<div class="ttc" id="aa01881_html"><div class="ttname"><a href="a01881.html">_TL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00347">usercli.h:347</a></div></div>
<div class="ttc" id="aa01921_html_abf52a6d63a553ed418bada12c9b2417b"><div class="ttname"><a href="a01921.html#abf52a6d63a553ed418bada12c9b2417b">tagLBIV::iMouseDown</a></div><div class="ttdeci">INT iMouseDown</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00954">usercli.h:954</a></div></div>
<div class="ttc" id="aa00182_html_ac49ebe397493c9908b4f22eadd65d5f6"><div class="ttname"><a href="a00182.html#ac49ebe397493c9908b4f22eadd65d5f6">xxxInsureVisible</a></div><div class="ttdeci">void xxxInsureVisible(PLBIV plb, INT iSel, BOOL fPartial)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l01916">lboxctl2.c:1916</a></div></div>
<div class="ttc" id="aa00182_html_a3e0630367eb018bf40e9bbc5924249ba"><div class="ttname"><a href="a00182.html#a3e0630367eb018bf40e9bbc5924249ba">xxxNotifyOwner</a></div><div class="ttdeci">void xxxNotifyOwner(PLBIV plb, INT sEvt)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l01140">lboxctl2.c:1140</a></div></div>
<div class="ttc" id="aa00179_html_a34ef470600d08b47b068c239f2dd7998"><div class="ttname"><a href="a00179.html#a34ef470600d08b47b068c239f2dd7998">xxxLBoxCtlDelete</a></div><div class="ttdeci">INT xxxLBoxCtlDelete(PLBIV plb, INT sItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00741">lboxctl1.c:741</a></div></div>
<div class="ttc" id="aa01917_html_a82743a203ae935594531fdbc9539b545"><div class="ttname"><a href="a01917.html#a82743a203ae935594531fdbc9539b545">_SCROLLPOS::iPos</a></div><div class="ttdeci">INT iPos</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00861">usercli.h:861</a></div></div>
<div class="ttc" id="aa00179_html_a6884cfb39f26b8e1f44ad90a3e96b3d1"><div class="ttname"><a href="a00179.html#a6884cfb39f26b8e1f44ad90a3e96b3d1">LBGetItemData</a></div><div class="ttdeci">LONG LBGetItemData(PLBIV plb, INT sItem)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00168">lboxctl1.c:168</a></div></div>
<div class="ttc" id="aa00179_html_a1b915647bff6cee4043bc4b0025c1535"><div class="ttname"><a href="a00179.html#a1b915647bff6cee4043bc4b0025c1535">LBCalcAllocNeeded</a></div><div class="ttdeci">UINT LBCalcAllocNeeded(PLBIV plb, INT cItems)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l01109">lboxctl1.c:1109</a></div></div>
<div class="ttc" id="aa01921_html_a622fb355036d625d60042b78025ecdc3"><div class="ttname"><a href="a01921.html#a622fb355036d625d60042b78025ecdc3">tagLBIV::fMultiColumn</a></div><div class="ttdeci">UINT fMultiColumn</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00923">usercli.h:923</a></div></div>
<div class="ttc" id="aa00362_html_acfbb149ad39bc9929fb7063d4276e470"><div class="ttname"><a href="a00362.html#acfbb149ad39bc9929fb7063d4276e470">NtUserInvalidateRect</a></div><div class="ttdeci">BOOL NtUserInvalidateRect(IN HWND hwnd, IN CONST RECT *prect OPTIONAL, IN BOOL bErase)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04092">kernel/ntstubs.c:4092</a></div></div>
<div class="ttc" id="aa01921_html_ab84d959c8cc5598602cd735047f91f06"><div class="ttname"><a href="a01921.html#ab84d959c8cc5598602cd735047f91f06">tagLBIV::iTop</a></div><div class="ttdeci">INT iTop</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00869">usercli.h:869</a></div></div>
<div class="ttc" id="aa01921_html_a10cabd3870f697deba5823036713c506"><div class="ttname"><a href="a01921.html#a10cabd3870f697deba5823036713c506">tagLBIV::OwnerDraw</a></div><div class="ttdeci">UINT OwnerDraw</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00892">usercli.h:892</a></div></div>
<div class="ttc" id="aa01917_html_a945bb59aa2eb5c750311ce55eb87699a"><div class="ttname"><a href="a01917.html#a945bb59aa2eb5c750311ce55eb87699a">_SCROLLPOS::fMask</a></div><div class="ttdeci">UINT fMask</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00862">usercli.h:862</a></div></div>
<div class="ttc" id="aa01917_html_ad4c37af4c2923b1bf9383de2d90d3bbf"><div class="ttname"><a href="a01917.html#ad4c37af4c2923b1bf9383de2d90d3bbf">_SCROLLPOS::iPage</a></div><div class="ttdeci">UINT iPage</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00860">usercli.h:860</a></div></div>
<div class="ttc" id="aa00269_html_af0c6e6ab165a8402677790d7b281c655"><div class="ttname"><a href="a00269.html#af0c6e6ab165a8402677790d7b281c655">CharUpperBuffW</a></div><div class="ttdeci">DWORD WINAPI CharUpperBuffW(LPWSTR pwsz, DWORD cwch)</div><div class="ttdef"><b>Definition:</b> <a href="a00269_source.html#l00298">wstrings.c:298</a></div></div>
<div class="ttc" id="aa00191_html_a01314a31f58530d70a807e14c5f1617f"><div class="ttname"><a href="a00191.html#a01314a31f58530d70a807e14c5f1617f">LBSetCItemFullMax</a></div><div class="ttdeci">void LBSetCItemFullMax(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00191_source.html#l00025">lboxrare.c:25</a></div></div>
<div class="ttc" id="aa01921_html_ab2a934bf9afb31afe96402ee89a76106"><div class="ttname"><a href="a01921.html#ab2a934bf9afb31afe96402ee89a76106">tagLBIV::fHasStrings</a></div><div class="ttdeci">UINT fHasStrings</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00908">usercli.h:908</a></div></div>
<div class="ttc" id="aa01921_html_acef4f1ea8a2a05629749d4ddfb105bd2"><div class="ttname"><a href="a01921.html#acef4f1ea8a2a05629749d4ddfb105bd2">tagLBIV::spwndParent</a></div><div class="ttdeci">PWND spwndParent</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00867">usercli.h:867</a></div></div>
<div class="ttc" id="aa00179_html_a394172430e46df98cecea85a2ca9df59"><div class="ttname"><a href="a00179.html#a394172430e46df98cecea85a2ca9df59">xxxLBResetContent</a></div><div class="ttdeci">BOOL xxxLBResetContent(PLBIV plb)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00696">lboxctl1.c:696</a></div></div>
<div class="ttc" id="aa01921_html_a8c22d5acea85648f5ad4d7388a73cd3e"><div class="ttname"><a href="a01921.html#a8c22d5acea85648f5ad4d7388a73cd3e">tagLBIV::fDisableNoScroll</a></div><div class="ttdeci">UINT fDisableNoScroll</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00931">usercli.h:931</a></div></div>
<div class="ttc" id="aa01921_html_af031416b0c1aad3b57cc15c469f41ecc"><div class="ttname"><a href="a01921.html#af031416b0c1aad3b57cc15c469f41ecc">tagLBIV::cItemFullMax</a></div><div class="ttdeci">INT cItemFullMax</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00872">usercli.h:872</a></div></div>
<div class="ttc" id="aa01921_html_aaef455959b7907cbaff286e61c5e029b"><div class="ttname"><a href="a01921.html#aaef455959b7907cbaff286e61c5e029b">tagLBIV::xOrigin</a></div><div class="ttdeci">int xOrigin</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00964">usercli.h:964</a></div></div>
<div class="ttc" id="aa00257_html_a6091781f063921fc304335d7f87acbd4"><div class="ttname"><a href="a00257.html#a6091781f063921fc304335d7f87acbd4">LBItem</a></div><div class="ttdeci">struct tagLBItem LBItem</div></div>
<div class="ttc" id="aa00362_html_a790ab491160804ab82699e9f0edb5077"><div class="ttname"><a href="a00362.html#a790ab491160804ab82699e9f0edb5077">NtUserSetScrollInfo</a></div><div class="ttdeci">int NtUserSetScrollInfo(IN HWND hwnd, IN int nBar, IN LPCSCROLLINFO pInfo, IN BOOL fRedraw)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04678">kernel/ntstubs.c:4678</a></div></div>
<div class="ttc" id="aa01921_html_ad51e2455d51f0327e18d4b156690db26"><div class="ttname"><a href="a01921.html#ad51e2455d51f0327e18d4b156690db26">tagLBIV::iSel</a></div><div class="ttdeci">INT iSel</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00870">usercli.h:870</a></div></div>
<div class="ttc" id="aa01921_html_a0f6bdbdc8f01ab790cee26a848d27730"><div class="ttname"><a href="a01921.html#a0f6bdbdc8f01ab790cee26a848d27730">tagLBIV::fFromInsert</a></div><div class="ttdeci">UINT fFromInsert</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00940">usercli.h:940</a></div></div>
<div class="ttc" id="aa01921_html_a5bd218ff1246ad262a29b369703fe78c"><div class="ttname"><a href="a01921.html#a5bd218ff1246ad262a29b369703fe78c">tagLBIV::spwnd</a></div><div class="ttdeci">PWND spwnd</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00868">usercli.h:868</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa03620_html"><div class="ttname"><a href="a03620.html">precomp.h</a></div></div>
<div class="ttc" id="aa00269_html_a7b02672ade64f653ad94cdb65587ba63"><div class="ttname"><a href="a00269.html#a7b02672ade64f653ad94cdb65587ba63">CharLowerBuffW</a></div><div class="ttdeci">DWORD WINAPI CharLowerBuffW(LPWSTR pwsz, DWORD cwch)</div><div class="ttdef"><b>Definition:</b> <a href="a00269_source.html#l00252">wstrings.c:252</a></div></div>
<div class="ttc" id="aa00179_html_a8ce1e80af8d4652d6c1b81ed2420b506"><div class="ttname"><a href="a00179.html#a8ce1e80af8d4652d6c1b81ed2420b506">xxxLBInsertItem</a></div><div class="ttdeci">INT xxxLBInsertItem(PLBIV plb, LPWSTR lpsz, INT index, UINT wFlags)</div><div class="ttdef"><b>Definition:</b> <a href="a00179_source.html#l00325">lboxctl1.c:325</a></div></div>
<div class="ttc" id="aa00899_html_a70b09c3e2b495630f4205d34be505afb"><div class="ttname"><a href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a></div><div class="ttdeci">VOID CheckLock(PVOID pobj)</div></div>
<div class="ttc" id="aa01921_html_ae3f41ae09649e6eb90edca233ee0953f"><div class="ttname"><a href="a01921.html#ae3f41ae09649e6eb90edca233ee0953f">tagLBIV::hStrings</a></div><div class="ttdeci">LPWSTR hStrings</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00880">usercli.h:880</a></div></div>
<div class="ttc" id="aa01921_html_abae0c031d21e87807959f436a83ce8a4"><div class="ttname"><a href="a01921.html#abae0c031d21e87807959f436a83ce8a4">tagLBIV::fRedraw</a></div><div class="ttdeci">UINT fRedraw</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00893">usercli.h:893</a></div></div>
<div class="ttc" id="aa01921_html_adf215a463519586b3a5202285100f6ab"><div class="ttname"><a href="a01921.html#adf215a463519586b3a5202285100f6ab">tagLBIV::iSelBase</a></div><div class="ttdeci">INT iSelBase</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00871">usercli.h:871</a></div></div>
<div class="ttc" id="aa01921_html_a0a54068a7898d057f9779868af834827"><div class="ttname"><a href="a01921.html#a0a54068a7898d057f9779868af834827">tagLBIV::fVertBar</a></div><div class="ttdeci">UINT fVertBar</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00939">usercli.h:939</a></div></div>
<div class="ttc" id="aa01921_html_a3b09e3cddaf31f472117320e7a71ce17"><div class="ttname"><a href="a01921.html#a3b09e3cddaf31f472117320e7a71ce17">tagLBIV::fHorzBar</a></div><div class="ttdeci">UINT fHorzBar</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00937">usercli.h:937</a></div></div>
<div class="ttc" id="aa00182_html_ae865bdbf8fc8b8c3982b92b6ecec38bd"><div class="ttname"><a href="a00182.html#ae865bdbf8fc8b8c3982b92b6ecec38bd">xxxNewITop</a></div><div class="ttdeci">void xxxNewITop(PLBIV plb, INT iTopNew)</div><div class="ttdef"><b>Definition:</b> <a href="a00182_source.html#l01841">lboxctl2.c:1841</a></div></div>
<div class="ttc" id="aa02581_html_a17d59d04094aef8b577c0aa781cdf2c6"><div class="ttname"><a href="a02581.html#a17d59d04094aef8b577c0aa781cdf2c6">tagWND::rcClient</a></div><div class="ttdeci">RECT rcClient</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01399">user.h:1399</a></div></div>
<div class="ttc" id="aa00020_html_ad760da1dd81d9e84dee607d18edfde39"><div class="ttname"><a href="a00020.html#ad760da1dd81d9e84dee607d18edfde39">gpsi</a></div><div class="ttdeci">PSERVERINFO gpsi</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00039">clglobal.c:39</a></div></div>
<div class="ttc" id="aa01921_html_a8abffa689a2601dffeb2ec73f0d35c8b"><div class="ttname"><a href="a01921.html#a8abffa689a2601dffeb2ec73f0d35c8b">tagLBIV::numberOfColumns</a></div><div class="ttdeci">INT numberOfColumns</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00888">usercli.h:888</a></div></div>
<div class="ttc" id="aa01925_html_a9390f7a1c66dcd4459c862b886656e67"><div class="ttname"><a href="a01925.html#a9390f7a1c66dcd4459c862b886656e67">tagLBItem::itemData</a></div><div class="ttdeci">DWORD itemData</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l01023">usercli.h:1023</a></div></div>
<div class="ttc" id="aa00365_html_ad3225ce06580cb58802233512f3d9c81"><div class="ttname"><a href="a00365.html#ad3225ce06580cb58802233512f3d9c81">IsVisible</a></div><div class="ttdeci">BOOL IsVisible(PWND pwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03728_source.html#l00456">rtl/winmgr.c:456</a></div></div>
<div class="ttc" id="aa01917_html_ab82d6fc6becaa18c4a882bcc35cc1a6a"><div class="ttname"><a href="a01917.html#ab82d6fc6becaa18c4a882bcc35cc1a6a">_SCROLLPOS::iReturn</a></div><div class="ttdeci">INT iReturn</div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00863">usercli.h:863</a></div></div>
<div class="ttc" id="aa02513_html_a481a03e7eb24994f1eca28391f9b7c77"><div class="ttname"><a href="a02513.html#a481a03e7eb24994f1eca28391f9b7c77">tagSERVERINFO::cySysFontChar</a></div><div class="ttdeci">int cySysFontChar</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01014">user.h:1014</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00179.html">lboxctl1.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
